package com.suixun.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import com.suixun.entity.DiscountOrderDO;
import com.suixun.entity.Factory;
import com.suixun.entity.form.OnlinepayForm;
import com.suixun.entity.page.PageModel;
import com.suixun.util.enums.Payment;
import com.suixun.vo.ChongqingOrderVO;
import com.suixun.vo.DiscountOrderVO;
import com.suixun.vo.OnlinepayVO;
import com.suixun.vo.RenewalOrderVO;

public interface OnlinepayService {
	
	PageModel<OnlinepayVO> queryList(OnlinepayForm onlinepay);
	
	String validateIMEI(OnlinepayForm onlinepayForm);
	
	int sendDevice(OnlinepayForm onlinepayForm);
	
	void sendChongqingDevice(String orderno, Date sendTime, String mdtid, Integer operationerid);
	
	void modifyChongqingDevice(String orderno, Date sendTime, String mdtid);
	
	List<Factory> queryFactorys();
	
	PageModel<DiscountOrderVO> getDiscountList(DiscountOrderVO discount) throws Exception;
	
	int sendDiscountDevice(DiscountOrderVO discount,long operationerid);
	
	int getOrderCount(String schoolname, Integer orderfrom);
	
	List<DiscountOrderDO> getSchoolNames(Integer orderfrom);
	
	int cancelOrder(OnlinepayForm onlinepayForm);
	
	HSSFWorkbook exportDiscountList(DiscountOrderVO discount) throws Exception;
	
	HSSFWorkbook exportOnlinepayList(OnlinepayForm onlinepay) throws Exception;
	
	String refund(OnlinepayForm onlinepay);
	
	void refunded(Integer userid, Integer deviceid, boolean issuccess,String failReason,
            String orderNo, Payment payment);
	
	PageModel<ChongqingOrderVO> listChongqingOrder(String telephone, Integer orderstatus,
			Integer status,int page, int size) throws Exception;
	
	Map<String,Object> getNotSendCounts();
	
	String getIdCardByPeopleTel(String peopletel, String cardProperty) throws Exception;
	
	PageModel<RenewalOrderVO> listRenewalOrders(String peopletel, String mdtid, int page, int size, Integer orderType);
	
	RenewalOrderVO getLastRenewalOrder(String peopletel, String mdtid);
	
	
	PageModel<DiscountOrderVO> getNewDiscountPage(DiscountOrderVO discount);
	
	int sendNewDiscountDevice(DiscountOrderVO discount, long operationerid);
}
